{	Problem: http://codeforces.ru/problemset/problem/17/A
	Verdict: Accepted

}
var i,n,k,cur,j,c,sum:longint; a:array[1..600] of longint; b:array[1..100001] of byte;
begin
readln(n,k);
fillchar(b,sizeof(b),0);
fillchar(A,sizeof(a),0);
b[1]:=2;
b[2]:=1;
i:=3;
cur:=1;
a[1]:=2;
while i<=1000 do begin
  if b[i]=0 then begin
    inc(cur);
    a[cur]:=i;
    b[i]:=1;
    j:=i*2;
    while j<=1000 do begin
      b[j]:=2;
      inc(j,i);
    end;
  end;
  inc(i,2);
end;
sum:=1;
c:=0;
sum:=a[1]+a[2]+1;
if b[sum]=1 then inc(c);
i:=2;
while (i<cur) and (c<k) and (sum<=n) do begin
  inc(i);
  dec(sum,a[i-2]);
  inc(sum,a[i]);
  if b[sum]=1 then inc(C);
end;
if c>=k then writeln('YES') else writeln('NO');
end.